package com.feeyo.prophet.pojo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

/**
 * 引擎返回的所有内容
 */
@Data
public class Conversation {
    private List<Choice> choices;
    private long created;
    private String id;
    private String model;
    private String object;
    private String systemFingerprint;

    @Data
    public static class Choice {
        @JsonProperty("content_filter_results")
        private ContentFilterResults contentFilterResults;
        private Delta delta;
        @JsonProperty("finish_reason")
        private String finishReason;
        private int index;
        private Object logprobs;

        @Data
        public static class ContentFilterResults {
            private FilterResult hate;
            @JsonProperty("self_harm")
            private FilterResult selfHarm;
            private FilterResult sexual;
            private FilterResult violence;

            @Data
            public static class FilterResult {
                private boolean filtered;
                private String severity;
            }
        }

        @Data
        public static class Delta {
            private String content;
        }
    }
}
